﻿using System;

namespace ConsoleApp1
{
    class Program
    {
        static void TestSwim(ISwim swim)
        {
            swim.Swim();
        }
        static void TestWrite(IWrite write) {

            write.Write();
        }
        static void TestTeacher(ITeacher teacher)
        {
            teacher.Teach();
        }
        public void TestStaff(IStaff staff)
        {

            staff.Staff();
        }
        static void Main(string[] args)
        {
            Teacher ch = new Teacher( "张三", "男");
            Programer th = new Programer( "王五", "男");
            ch.Watch();
            ch.Sleep();
            TestSwim(ch);
            TestTeacher(ch);
            TestWrite(ch);
            Console.WriteLine();

            th.Watch();
            th.Sleep();
            TestWrite(th);
            
           
        }
    }
}
